from django.contrib.syndication.feeds import Feed
from comics.models import Comic
import datetime

class LatestEntries(Feed):
    title = "NAME REMOVED the webcomic"
    link = "http://nameremoved.com/"
    description = "A regular feed of irregular comics."
    author_name = "Nicholas Wolfe"
    copyright = "Copyright (c) 2007, Nicholas Wolfe. All rights reserved."
    
    def items(self):
        return Comic.public_comics.all().order_by('-date')[:10]
    
    def item_pubdate(self, item):
        return item.date